package global

import (
	"github.com/casbin/casbin/v2"
	ut "github.com/go-playground/universal-translator"
	"github.com/go-redis/redis/v8"
	"github.com/gorilla/sessions"
	"gorm.io/gorm"
)

// 定义全局初始化相关
var (
	Trans ut.Translator         // 定义一个全局翻译器T
	Cfg = new(SysConfig)        // 定义配置全局变量
	Const = new(ConstConfig)        // 定义配置全局变量
	Orm *gorm.DB                // 定义orm全局变量
	Rdb *redis.Client           // 定义redis全局变量
	Efc *casbin.Enforcer        // 定义casbin全局变量
)

var (
	key = []byte("yundian")
	AdminLoginStore = sessions.NewCookieStore(key)
)

var Levels1 = []int{11,17,23,29,35,39,48,54,61,65,69,79,85}
//var Levels1 = []int{3,6,11,17,23,29,35,39,48,54,61,65,69,79,85,91,96,100}
//var Levels2 = []int{11,17,23,39,48,54,61,69,79,85}
var Levels2 = []int{11,17,23,39,48,54,61,69,79,85}
//var Levels2 = []int{}
